<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="module">
        var p1 = new Promise((resolve, reject) => {
            setTimeout(resolve, 2000, 'p1');
        });
        var p2 = new Promise((resolve, reject) => {
            setTimeout(resolve, 1000, 'p2');
        });
        async function test() {
             p1.then(ret => {
                console.log(ret)
            });
             p2.then(ret => {
                console.log(ret)
            });
            console.log("end");
        }
        test();
    </script>
</head>
<body>

</body>
</html>
